
using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class TRANSFER_BILLSMap : EntityTypeConfiguration<TRANSFER_BILLS>
    {
        public TRANSFER_BILLSMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.TRANSFER_BILL_NO)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.OPERATOR_NO)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.SEND_PEOPLE)
                .HasMaxLength(20);

            this.Property(t => t.RECEIVE_OPERATOR_NO)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.TRANSFER_FROM)
                .HasMaxLength(50);

            this.Property(t => t.TRANSFER_TO)
                .HasMaxLength(50);

            this.Property(t => t.CREATED_BY)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.MODIFY_BY)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.DeleteRemark).HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("TRANSFER_BILLS");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.TRANSFER_BILL_NO).HasColumnName("TRANSFER_BILL_NO");
            this.Property(t => t.OPERATOR_NO).HasColumnName("OPERATOR_NO");
            this.Property(t => t.TRANSFER_DATE).HasColumnName("TRANSFER_DATE");
            this.Property(t => t.SEND_PEOPLE).HasColumnName("SEND_PEOPLE");
            this.Property(t => t.SEND_DATE).HasColumnName("SEND_DATE");
            this.Property(t => t.RECEIVE_OPERATOR_NO).HasColumnName("RECEIVE_OPERATOR_NO");
            this.Property(t => t.CONFIRM_DATE).HasColumnName("CONFIRM_DATE");
            this.Property(t => t.TRANSFER_TYPE).HasColumnName("TRANSFER_TYPE");
            this.Property(t => t.TRANSFER_FROM).HasColumnName("TRANSFER_FROM");
            this.Property(t => t.TRANSFER_TO).HasColumnName("TRANSFER_TO");
            this.Property(t => t.STATUS).HasColumnName("STATUS");
            this.Property(t => t.CREATED_BY).HasColumnName("CREATED_BY");
            this.Property(t => t.CREATED_DATE).HasColumnName("CREATED_DATE");
            this.Property(t => t.MODIFY_BY).HasColumnName("MODIFY_BY");
            this.Property(t => t.MODIFY_DATE).HasColumnName("MODIFY_DATE");
            this.Property(t => t.DeleteRemark).HasColumnName("DeleteRemark");
        }
    }
}
